const loginBaseUrl = '/bomc/user'
const commonBaseUrl = '/bomc/common'
const companyBaseUrl = '/bomc/merchantCompany'
const merchantBaseUrl = '/bomc/merchantPartnerInfo'
const distributionBaseUrl = '/bomc/distributionCompany'
const distributionPartnerInfoBaseUrl = '/bomc/distributionPartnerInfo'
const reportBaseUrl = '/bomc/report'
const systemApiLogBaseUrl = '/bomc/systemApiLog'
const systemSmsHistoryBaseUrl = '/bomc/systemSmsHistory'
const premisesBaseUrl = '/bomc/premises'
const dynamicBaseUrl = '/bomc/dynamic'
const wxMsgFailureBaseUrl = '/bomc/wxMsgFailure'

// 登录
const Login = {
  login: {
    method: 'POST',
    url: `${loginBaseUrl}/login`
  }
}

// 通用接口
const Common = {
  // 省
  listProvince: {
    method: 'POST',
    url: `${commonBaseUrl}/listProvince`
  },
  // 市
  listCity: {
    method: 'POST',
    url: `${commonBaseUrl}/listCity`
  },
  // 区
  listZone: {
    method: 'POST',
    url: `${commonBaseUrl}/listZone`
  },
  // 上传文件
  uploadFile: {
    method: 'POST',
    url: `${commonBaseUrl}/uploadFile`
  },
  // 上传微信配置文件
  uploadWxJs: {
    method: 'POST',
    url: `${commonBaseUrl}/uploadWxJs`
  },
  // 清空无效报备
  clearInvalidReport: {
    method: 'POST',
    url: `${commonBaseUrl}/clearInvalidReport`
  },
  // 刷新楼盘置业顾问关系
  refreshAdviser: {
    method: 'POST',
    url: `${commonBaseUrl}/refreshAdviser`
  },
}

// 商户接口
const Company = {
  // 新增
  addCompany: {
    method: 'POST',
    url: `${companyBaseUrl}/addCompany`
  },
  // 删除
  deleteCompany: {
    method: 'POST',
    url: `${companyBaseUrl}/deleteCompany`
  },
  // 编辑
  updateCompany: {
    method: 'POST',
    url: `${companyBaseUrl}/updateCompany`
  },
  // 详情
  getCompany: {
    method: 'POST',
    url: `${companyBaseUrl}/getCompany`
  },
  // 列表
  listCompany: {
    method: 'POST',
    url: `${companyBaseUrl}/listCompany`
  },
  // 启用
  enableCompany: {
    method: 'POST',
    url: `${companyBaseUrl}/enableCompany`
  },
  // 禁用
  disableCompany: {
    method: 'POST',
    url: `${companyBaseUrl}/disableCompany`
  },
  // 批量删除
  batchDeleteCompany: {
    method: 'POST',
    url: `${companyBaseUrl}/batchDeleteCompany`
  },
  // 批量禁用
  batchDisableCompany: {
    method: 'POST',
    url: `${companyBaseUrl}/batchDisableCompany`
  },
  // 批量启用
  batchEnableCompany: {
    method: 'POST',
    url: `${companyBaseUrl}/batchEnableCompany`
  },
  // 公司列表
  listOptionCompany: {
    method: 'POST',
    url: `${companyBaseUrl}/listOptionCompany`
  },
  // 根据渠道ID查询分销机构公司列表(下拉框)
  listOptionDistributionCompany: {
    method: 'POST',
    url: `${distributionBaseUrl}/listOptionDistributionCompany`,
  },
  // 批量绑定V10
  batchBindCompany: {
    method: 'POST',
    url: `${companyBaseUrl}/batchBindCompany`,
  },
  // 批量修改绑定V10
  batchUpdateBindCompany: {
    method: 'POST',
    url: `${companyBaseUrl}/batchUpdateBindCompany`,
  },
  // 查询绑定V10的公司
  findOtherCompany: {
    method: 'POST',
    url: `${companyBaseUrl}/findOtherCompany`,
  },
  // 解除公司绑定
  deleteBindCompany: {
    method: 'POST',
    url: `${companyBaseUrl}/deleteBindCompany`,
  },
  cleanCompanyCache: {
    method: 'POST',
    url: `${companyBaseUrl}/cleanCompanyCache`,
  },
}

// 商户人员接口
const Merchant = {
  // 新增
  addPartnerInfo: {
    method: 'POST',
    url: `${merchantBaseUrl}/addPartnerInfo`
  },
  // 删除
  deletePartnerInfo: {
    method: 'POST',
    url: `${merchantBaseUrl}/deletePartnerInfo`
  },
  // 编辑
  updatePartnerInfo: {
    method: 'POST',
    url: `${merchantBaseUrl}/updatePartnerInfo`
  },
  // 详情
  getPartnerInfo: {
    method: 'POST',
    url: `${merchantBaseUrl}/getPartnerInfo`
  },
  // 列表
  listPartnerInfo: {
    method: 'POST',
    url: `${merchantBaseUrl}/listPartnerInfo`
  },
  // 启用
  enablePartnerInfo: {
    method: 'POST',
    url: `${merchantBaseUrl}/enablePartnerInfo`
  },
  // 禁用
  disablePartnerInfo: {
    method: 'POST',
    url: `${merchantBaseUrl}/disablePartnerInfo`
  },
  // 批量删除
  batchDeletePartnerInfo: {
    method: 'POST',
    url: `${merchantBaseUrl}/batchDeletePartnerInfo`
  },
  // 批量禁用
  batchDisablePartnerInfo: {
    method: 'POST',
    url: `${merchantBaseUrl}/batchDisablePartnerInfo`
  },
  // 批量启用
  batchEnablePartnerInfo: {
    method: 'POST',
    url: `${merchantBaseUrl}/batchEnablePartnerInfo`
  },
  // 取消超管
  cancelAdminPartnerInfo: {
    method: 'POST',
    url: `${merchantBaseUrl}/cancelAdminPartnerInfo`
  },
  // 设置超管
  installAdminPartnerInfo: {
    method: 'POST',
    url: `${merchantBaseUrl}/installAdminPartnerInfo`
  },
  // 公司列表
  listCompany: {
    method: 'POST',
    url: `${merchantBaseUrl}/listCompany`
  },
  // 清除用户缓存
  cleanPartnerCache: {
    method: 'POST',
    url: `${merchantBaseUrl}/cleanPartnerCache`
  },
}

// 分销商接口
const Distribution = {
  // 新增
  addCompany: {
    method: 'POST',
    url: `${distributionBaseUrl}/addCompany`
  },
  // 删除
  deleteCompany: {
    method: 'POST',
    url: `${distributionBaseUrl}/deleteCompany`
  },
  // 编辑
  updateCompany: {
    method: 'POST',
    url: `${distributionBaseUrl}/updateCompany`
  },
  // 详情
  getCompany: {
    method: 'POST',
    url: `${distributionBaseUrl}/getCompany`
  },
  // 列表
  listCompany: {
    method: 'POST',
    url: `${distributionBaseUrl}/listCompany`
  },
  // 启用
  enableCompany: {
    method: 'POST',
    url: `${distributionBaseUrl}/enableCompany`
  },
  // 禁用
  disableCompany: {
    method: 'POST',
    url: `${distributionBaseUrl}/disableCompany`
  },
  // 批量删除
  batchDeleteCompany: {
    method: 'POST',
    url: `${distributionBaseUrl}/batchDeleteCompany`
  },
  // 批量禁用
  batchDisableCompany: {
    method: 'POST',
    url: `${distributionBaseUrl}/batchDisableCompany`
  },
  // 批量启用
  batchEnableCompany: {
    method: 'POST',
    url: `${distributionBaseUrl}/batchEnableCompany`
  },
  // 渠道经理列表
  listMerchantPartnerInfo: {
    method: 'POST',
    url: `${distributionBaseUrl}/listMerchantPartnerInfo`
  },
  // 公司列表（下拉框）
  listOptionCompany: {
    method: 'POST',
    url: `${distributionBaseUrl}/listOptionCompany`
  },
}

// 分销商人员接口
const DistributionPartnerInfo = {
  // 新增
  addPartnerInfo: {
    method: 'POST',
    url: `${distributionPartnerInfoBaseUrl}/addPartnerInfo`
  },
  // 删除
  deletePartnerInfo: {
    method: 'POST',
    url: `${distributionPartnerInfoBaseUrl}/deletePartnerInfo`
  },
  // 编辑
  updatePartnerInfo: {
    method: 'POST',
    url: `${distributionPartnerInfoBaseUrl}/updatePartnerInfo`
  },
  // 详情
  getPartnerInfo: {
    method: 'POST',
    url: `${distributionPartnerInfoBaseUrl}/getPartnerInfo`
  },
  // 列表
  listPartnerInfo: {
    method: 'POST',
    url: `${distributionPartnerInfoBaseUrl}/listPartnerInfo`
  },
  // 启用
  enablePartnerInfo: {
    method: 'POST',
    url: `${distributionPartnerInfoBaseUrl}/enablePartnerInfo`
  },
  // 禁用
  disablePartnerInfo: {
    method: 'POST',
    url: `${distributionPartnerInfoBaseUrl}/disablePartnerInfo`
  },
  // 批量删除
  batchDeletePartnerInfo: {
    method: 'POST',
    url: `${distributionPartnerInfoBaseUrl}/batchDeletePartnerInfo`
  },
  // 批量禁用
  batchDisablePartnerInfo: {
    method: 'POST',
    url: `${distributionPartnerInfoBaseUrl}/batchDisablePartnerInfo`
  },
  // 批量启用
  batchEnablePartnerInfo: {
    method: 'POST',
    url: `${distributionPartnerInfoBaseUrl}/batchEnablePartnerInfo`
  },
  // 取消超管
  cancelAdminPartnerInfo: {
    method: 'POST',
    url: `${distributionPartnerInfoBaseUrl}/cancelAdminPartnerInfo`
  },
  // 设置超管
  installAdminPartnerInfo: {
    method: 'POST',
    url: `${distributionPartnerInfoBaseUrl}/installAdminPartnerInfo`
  },
  // 公司列表
  listCompany: {
    method: 'POST',
    url: `${distributionPartnerInfoBaseUrl}/listCompany`
  },
}
const report = {
  v10ReportList: {
    method: 'POST',
    url: `${reportBaseUrl}/listReport`
  },
  v10ReportDetail: {
    method: 'POST',
    url: `${reportBaseUrl}/getReport`
  },
  sendStatus: {
    method: 'POST',
    url: `${reportBaseUrl}/sendStatus`
  },
  listCusPreHistory: {
    method: 'POST',
    url: `${reportBaseUrl}/listCusPreHistory`
  },
  listCusPreNormal: {
    method: 'POST',
    url: `${reportBaseUrl}/listCusPreNormal`
  },
  listFollow: {
    method: 'POST',
    url: `${reportBaseUrl}/listFollow`
  },
  changeStatus: {
    method: 'POST',
    url: `${reportBaseUrl}/changeStatus`
  },
  pushPremisesToV10: {
    method: 'POST',
    url: `${reportBaseUrl}/pushPremisesToV10`
  },
  downloadFailExcel: {
    method: 'GET',
    url: '/bomc/batch/downloadFailExcel',
    responseType: 'blob'
  },
  downloadModelExcel: {
    method: 'GET',
    url: '/bomc/batch/downloadModelExcel',
    responseType: 'blob'
  },
  // 删除报备
  deleteCusPre: {
    method: 'POST',
    url: `${reportBaseUrl}/deleteCusPre`
  },
}

const SystemApiLog = {
  apiLogList: {
    method: 'POST',
    url: `${systemApiLogBaseUrl}/listApiLog`
  },
  sendApiLogAgain: {
    method: 'POST',
    url: `${systemApiLogBaseUrl}/sendApiLogAgain`
  },
}

const SystemSmsHistory = {
  smsHistorySummaryList: {
    method: 'POST',
    url: `${systemSmsHistoryBaseUrl}/listSmsHistorySummary`
  },
  smsHistorySummaryExport: {
    method: 'GET',
    url: `${systemSmsHistoryBaseUrl}/exportSmsHistorySummary`,
    responseType: 'blob'
  },
  smsHistoryFailureList: {
    method: 'POST',
    url: `${systemSmsHistoryBaseUrl}/listSmsHistoryFailure`
  },
  sendFailureSmsAgain: {
    method: 'POST',
    url: `${systemSmsHistoryBaseUrl}/sendFailureSmsAgain`
  },
}

// 楼盘接口
const Premises = {
  // 省
  listPremises: {
    method: 'POST',
    url: `${premisesBaseUrl}/listPremises`
  },
  // 删除楼盘
  deletePremises: {
    method: 'POST',
    url: `${premisesBaseUrl}/deletePremises`
  },
}

//楼盘动态接口
const dynamic = {
  listPremisesDynamic: {
    method: 'POST',
    url: `${dynamicBaseUrl}/listPremisesDynamic`
  },
  findBindPremisesDynamic: {
    method: 'POST',
    url: `${dynamicBaseUrl}/findBindPremisesDynamic`
  },
  getDynamicDetail: {
    method: 'POST',
    url: `${dynamicBaseUrl}/getDynamicDetail`
  },
  pushDynamicToV10: {
    method: 'POST',
    url: `${dynamicBaseUrl}/pushDynamicToV10`
  },
}

//微信失败消息接口
const wxMsgFailure = {
  listWxMsgFailure: {
    method: 'POST',
    url: `${wxMsgFailureBaseUrl}/listWxMsgFailure`
  },
  updateWxMsgFailure: {
    method: 'POST',
    url: `${wxMsgFailureBaseUrl}/updateWxMsgFailure`
  }
}

export default {
  Login,
  Common,
  Company,
  Merchant,
  Distribution,
  DistributionPartnerInfo,
  report,
  SystemApiLog,
  SystemSmsHistory,
  Premises,
  dynamic,
  wxMsgFailure
}
